<!--
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->

<link rel="import" href="../topeka-quiz-base.html">
<link rel="import" href="../../paper-slider/paper-slider.html">

<polymer-element name="topeka-quiz-picker" extends="topeka-quiz-base">
<template>

  <link rel="stylesheet" href="topeka-quiz-picker.css">
  
  <div class="picker-value font-light">{{value}}</div>
  
  <paper-slider id="slider" min="{{quiz.min}}" max="{{quiz.max}}" step="{{quiz.step || 1}}" immediateValue="{{value}}"></paper-slider>

</template>
<script>

  Polymer('topeka-quiz-picker', {
    
    eventDelegates: {
      down: 'answered',
    },
    
    quizChanged: function() {
      this.value = this.$.slider.value = this.$.slider.secondaryProgress = this.quiz.min || 0;
    }
    
  });

</script>
</polymer-element>